3.1.58 \(\int \frac {1+x^2}{1+4 x^2+x^4} \, dx\)

Optimal. Leaf size=43 \[ \frac {\tan ^{-1}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {6}}+\frac {\tan ^{-1}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{\sqrt {6}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1163, 203} \begin {gather*} \frac {\tan ^{-1}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {6}}+\frac {\tan ^{-1}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{\sqrt {6}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x^2)/(1 + 4*x^2 + x^4),x]

[Out]

ArcTan[x/Sqrt[2 - Sqrt[3]]]/Sqrt[6] + ArcTan[x/Sqrt[2 + Sqrt[3]]]/Sqrt[6]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1163

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && GtQ[b^2
 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {1+x^2}{1+4 x^2+x^4} \, dx &=\frac {1}{6} \left (3-\sqrt {3}\right ) \int \frac {1}{2-\sqrt {3}+x^2} \, dx+\frac {1}{6} \left (3+\sqrt {3}\right ) \int \frac {1}{2+\sqrt {3}+x^2} \, dx\\ &=\frac {\tan ^{-1}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{\sqrt {6}}+\frac {\tan ^{-1}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{\sqrt {6}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 81, normalized size = 1.88 \begin {gather*} \frac {\left (\sqrt {3}-1\right ) \tan ^{-1}\left (\frac {x}{\sqrt {2-\sqrt {3}}}\right )}{2 \sqrt {3 \left (2-\sqrt {3}\right )}}+\frac {\left (1+\sqrt {3}\right ) \tan ^{-1}\left (\frac {x}{\sqrt {2+\sqrt {3}}}\right )}{2 \sqrt {3 \left (2+\sqrt {3}\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x^2)/(1 + 4*x^2 + x^4),x]

[Out]

((-1 + Sqrt[3])*ArcTan[x/Sqrt[2 - Sqrt[3]]])/(2*Sqrt[3*(2 - Sqrt[3])]) + ((1 + Sqrt[3])*ArcTan[x/Sqrt[2 + Sqrt
[3]]])/(2*Sqrt[3*(2 + Sqrt[3])])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1+x^2}{1+4 x^2+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(1 + x^2)/(1 + 4*x^2 + x^4),x]

[Out]

IntegrateAlgebraic[(1 + x^2)/(1 + 4*x^2 + x^4), x]

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 31, normalized size = 0.72 \begin {gather*} \frac {1}{6} \, \sqrt {6} \arctan \left (\frac {1}{6} \, \sqrt {6} {\left (x^{3} + 5 \, x\right )}\right ) + \frac {1}{6} \, \sqrt {6} \arctan \left (\frac {1}{6} \, \sqrt {6} x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+4*x^2+1),x, algorithm="fricas")

[Out]

1/6*sqrt(6)*arctan(1/6*sqrt(6)*(x^3 + 5*x)) + 1/6*sqrt(6)*arctan(1/6*sqrt(6)*x)

________________________________________________________________________________________

giac [A]  time = 0.19, size = 26, normalized size = 0.60 \begin {gather*} \frac {1}{12} \, \sqrt {6} {\left (\pi \mathrm {sgn}\relax (x) + 2 \, \arctan \left (\frac {\sqrt {6} {\left (x^{2} - 1\right )}}{6 \, x}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+4*x^2+1),x, algorithm="giac")

[Out]

1/12*sqrt(6)*(pi*sgn(x) + 2*arctan(1/6*sqrt(6)*(x^2 - 1)/x))

________________________________________________________________________________________

maple [B]  time = 0.05, size = 110, normalized size = 2.56 \begin {gather*} -\frac {\sqrt {3}\, \arctan \left (\frac {2 x}{\sqrt {6}-\sqrt {2}}\right )}{3 \left (\sqrt {6}-\sqrt {2}\right )}+\frac {\arctan \left (\frac {2 x}{\sqrt {6}-\sqrt {2}}\right )}{\sqrt {6}-\sqrt {2}}+\frac {\sqrt {3}\, \arctan \left (\frac {2 x}{\sqrt {6}+\sqrt {2}}\right )}{3 \sqrt {6}+3 \sqrt {2}}+\frac {\arctan \left (\frac {2 x}{\sqrt {6}+\sqrt {2}}\right )}{\sqrt {6}+\sqrt {2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2+1)/(x^4+4*x^2+1),x)

[Out]

1/3*3^(1/2)/(6^(1/2)+2^(1/2))*arctan(2*x/(6^(1/2)+2^(1/2)))+1/(6^(1/2)+2^(1/2))*arctan(2*x/(6^(1/2)+2^(1/2)))-
1/3*3^(1/2)/(6^(1/2)-2^(1/2))*arctan(2*x/(6^(1/2)-2^(1/2)))+1/(6^(1/2)-2^(1/2))*arctan(2*x/(6^(1/2)-2^(1/2)))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} + 1}{x^{4} + 4 \, x^{2} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2+1)/(x^4+4*x^2+1),x, algorithm="maxima")

[Out]

integrate((x^2 + 1)/(x^4 + 4*x^2 + 1), x)

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 29, normalized size = 0.67 \begin {gather*} \frac {\sqrt {6}\,\left (\mathrm {atan}\left (\frac {\sqrt {6}\,x^3}{6}+\frac {5\,\sqrt {6}\,x}{6}\right )+\mathrm {atan}\left (\frac {\sqrt {6}\,x}{6}\right )\right )}{6} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 + 1)/(4*x^2 + x^4 + 1),x)

[Out]

(6^(1/2)*(atan((5*6^(1/2)*x)/6 + (6^(1/2)*x^3)/6) + atan((6^(1/2)*x)/6)))/6

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 41, normalized size = 0.95 \begin {gather*} \frac {\sqrt {6} \left (2 \operatorname {atan}{\left (\frac {\sqrt {6} x}{6} \right )} + 2 \operatorname {atan}{\left (\frac {\sqrt {6} x^{3}}{6} + \frac {5 \sqrt {6} x}{6} \right )}\right )}{12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2+1)/(x**4+4*x**2+1),x)

[Out]

sqrt(6)*(2*atan(sqrt(6)*x/6) + 2*atan(sqrt(6)*x**3/6 + 5*sqrt(6)*x/6))/12

________________________________________________________________________________________